The present invention generally relates to event simulation and, in particular, to methods and systems for realizing reset in discrete event simulation.
Simulation is used to obtain information or validate/invalidate hypothesis about the events being simulated. Generally, event simulation is iterative in nature. During a simulation session, a common sequence of events is simulated for some amount of time. The simulation state is investigated periodically. Based on the investigation results, one or more simulation parameters may be modified before the simulation is started again from the beginning. Reset is the act of starting the simulation again from the beginning. Reset is helpful during a simulation session where the discovery of certain information is made at a particular time. Upon such discovery, the simulation may be reset and then run again from the initial state based on the newly discovered information. Consequently, providing the ability to reset a simulation is an important capability for discrete event simulation tools.
Typically, prior solutions for implementing reset during simulation are programmatic. One such programmatic solution for achieving reset is to provide a set of functions that effect assignments to “0” for each simulation variable in each program included in the simulator. When reset is desired, a control program calls these functions. It is programmatic in the sense that the actual act of reset is made possible by the manual creation of specially designed program functions (“reset functions”) that make one or more assignments to the simulation variables in order to return the simulation to its initial state.
The programmatic approach has a number of disadvantages. First, it is common practice to include initialization actions in the initialization routines of a program. For the programmatic approach to work, these routines must be either explicitly called again or initialization code needs to be created in specially designed reset functions. Secondly, a public interface for creating and calling these functions has to be provided if the simulator is allowed to include simulation modules that are created externally. In most cases, the user of a simulator can create their own programming code that is called by the simulator. This code has its own variables that are part of the simulation state. For reset, these variables need to be reset to an initial state, such as, “0”. The simulator controls the reset action. As a result, the simulator has to know how to call the reset functions in the code provided by the user. The ability to call the reset functions has to be provided for via a public interface. Information relating to the public interface is usually made available to the user by a documentation manual. Finally, there can be millions of variables in a simulator. Each needs to be re-assigned for true reset to occur. The chances of a programmer omitting some of the necessary assignments increase as the simulator becomes more complex. Thus, for complex simulators, programmatic reset is an error-prone strategy that becomes less maintainable every time the simulator is extended as part of the normal software development life cycle.
Hence, it would be desirable to provide methods and systems that are capable of, amongst other things, realizing reset in discrete event simulation in a more efficient manner and avoiding the disadvantages of prior art systems as described above.